﻿using System;
using MyTime.ProviderFactory.Entities;

namespace MyTime.Core.Entities
{
    public class DefaultTimeItem : ITimeItem
    {
        public DefaultTimeItem(){}
        public DefaultTimeItem(string task, DateTime startTime)
        {
            Task = task;
            StartTime = startTime;
            WeekNumber = DateTime.Now.GetWeekNumber();
            TotalTime = new TimeSpan(1,0,0);
        }

        public DefaultTimeItem(string task, DateTime startTime, DateTime endTime)
        {
            Task = task;
            StartTime = startTime;
            EndTime = endTime;
        }

        #region ITimeItem Members

        public int Id { get; set; }
        public string Task { get; set; }
        public DateTime StartTime { get; set; }
        public DateTime? EndTime { get; set; }
        public TimeSpan TotalTime { get; set; }
        public int WeekNumber { get; set; }

        public bool Current { get; set; }
        public int ProjectId { get; set; }
        public string ProjectName { get; set; }

        #endregion
    }
}